package com.zhaimen.module.product.controller.app.homelink;

import cn.hutool.extra.spring.SpringUtil;
import com.zhaimen.framework.common.pojo.CommonResult;
import com.zhaimen.module.product.dal.dataobject.homelink.HomeLinkDO;
import com.zhaimen.module.product.service.homelink.HomeLinkService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/product/homelink")
@Validated
@Tag(name = "用户APP-个人主页链接")
@Slf4j
public class AppHomeLinkController {

    @Resource
    private HomeLinkService homeLinkService;

    @GetMapping("/get-all")
    @Operation(summary = "获取主页链接")
    private CommonResult<List<HomeLinkDO>> getHomeLinkAll() {
        List<HomeLinkDO> homeLinkDOSet= homeLinkService.getHomeLinkAll();
        return CommonResult.success(homeLinkDOSet);
    }
}
